<?php
namespace app\index\controller;
use think\Controller;

Class Brand extends Base
{

	//品牌列表
    public function lst()
    {
    	$data=array();
        $BrandRes=db('tp_brand')->paginate(3);
        $data['lastPage']=$BrandRes->lastPage();
        $brands=$BrandRes->items();
        $html='';
        $html.='<ul>';
        foreach ($brands as $k=> $v) {
           $html.='<li><div class="brand-img"><a href="'.$v["brand_url"].'" target="_blank"><img src="'.config("view_replace_str.__uploads__").'/'.$v["brand_img"].'"></a></div></li>';
        }
        $html.='<ul><a href="javascript:void(0);" ectype="changeBrand" class="refresh-btn"><i class="iconfont icon-rotate-alt"></i><span>换一批</span></a>';
        $data['brands']=$html;
        return $data;
    }


}